home *** CD-ROM | disk | FTP | other *** search
- rshell-protector.doc
-
- INTRODUCTION
- As a sysop or networking-fan you are lucky if the following never
- happened to you:
- Some Cosys logs in, enters the shell to search a file and
- accidentially starts a GUI-driven program that's not
- self-detaching. POOF! Your BBS hangs! If you are at home - fine.
- If you aren't, your system will be down for a long time.
- Ever tried the same thing under X11? If you start a GUI-driven
- program from a local shell - no problem. If you try it via a
- telnet link (and don't specify any "-display" parameters) it
- just says "Can't open display!" and exits.
- This is what RShell-Protector achieves on the Amiga.
-
- REQUIREMENTS
- RShell-Protector makes use of environment variables and therefore
- requires OS2.04. To get everything out of the program you should have a
- modem or network. In other words, if you don't have either this program is
- of absolutely no use for you. But you could install it anyway, some
- Lunkwill'n'Skywalkerization of your system won't hurt 8^)))
-
- INSTALLATION/USAGE
- The "rshell-protector" executable is intended to be run as a
- background task in the user-startup script. The install-script
- included in this archive should perform all necessary changes for
- you. The program patches intuition.library and then hangs in the
- background, waiting for a Ctrl-C signal. If you ever want to
- remove the patches, just use "break <processnumber> c". No fancy
- (and illegal) patching routines are used so RShell-Protector will
- work fine with SaferPatches.
- As only parameter RShell-Protector takes the name of a local
- variable which is set in shells that should be protected.
- E.g. in the shell-startup script use:
- set RSHELL-PROTECTOR 1
- and that shell will be protected.
- Programs started from this process (and their children which inherit
- local variables) will fail to open any window or screen. Using
- the "set" and "unset" commands you can switch between "protected"
- and "unprotected" while the shell is running.
- There might be programs which don't care if intuition returns
- NULL on an OpenScreen()/OpenWindow() call. They will render into
- an invalid rastport and crash. The best place for such programs
- is your trashcan.
-
- CNET BBS INSTALLATION
- When running a network with remote-logins you will most likely
- have some kind of rlogin-startup script, which you don't have for
- the BBS shell in CNet. Let's change that:
- Load CNet's "bbstext" file into your favourite editor and move to
- line #632 where you can find a newshell-command and some options
- for the FIFO: handler. Just change the end of the line from
- "from S:shell-startup" to something like
- "from s:CNetShell-Startup" and save the file.
- Create a file called "CNetShell-Startup (or however you called
- it) in your s: directory. It should contain at least:
- execute s:shell-startup
- set RSHELL-PROTECTOR 1
- and maybe some other tools/patches that you want to use from the
- BBS shell only (ReqOff and the like). Now select "text/menu reload"
- from CNet's menu and you're done.
-
- INSTALLATION ON OTHER BBS-PROGRAMS
- Sorry, can't tell you much about this - you have to find out
- yourself. Using SnoopDos will help! For DLG the installation
- should be similar to CNet, AFAIK the command to call when opening
- a shell is also configurable through a textfile.
-
- TECHNICAL INFO/COMPATIBILITY
- RShell-Protector patches the following intuition-functions:
- OpenScreen()
- OpenWindow()
- OpenScreenTagList()
- OpenWindowTagList()
- On every call to these functions it checks for the environment
- variable specified for patching. If there is no such variable
- the original function is called. Otherwise an error-message is
- printed on stdout and zero returned, which means "failure" to the
- calling program.
- Unlike previous versions V37.4+ *does* check if the patch was called
- from a task or from a process and, in case of a task, does not call
- any dos.library functions which would be illegal.
- Thanks to Giuseppe Sacco for explaining how to distinguish between
- tasks and processes!
-
- RShell-Protector has been tested on:
- A4000/040, OS3.0 & OS3.1, 12MB RAM, Fastlane, Merlin
- A4000/030, OS3.0 & OS3.1, 22MB RAM, GVP-II, Merlin, MFC-2, CNet/3
- A2000, A2630, OS3.1, 7MB RAM, Mastercard, MFC-2, CNet/3
- No 68030 or OS3.0+ specific features are used so it should also
- run on the 68000 and with OS2.04.
-
- BUGS
- Returncode is always 0, no matter if the patching succeeded or
- not. If this annoys you, fix it.
-
- COPYLEFT
- RShell-Protector is copylefted software. Do with it whatever you
- like. The sourcecode in asm is included so you can hack around
- with it. (From V37.4 on we used PhxAss (oops, still unreg., sorry!)
- because AsmOne doesn't like Motorola's new asm syntax :-( )
- The only thing you must not do is redistribute hacked-up versions
- with our names in them - or thou shalt be marked a lamer forever!
- If you implement any improvements, please let us know. See below
- for addresses.
-
- AUTHORS
- If you can't find us on IRC, send comments, flames etc. to:
- Usenet: Matthias.Bethke@mni.fh-giessen.de
- AmigaNet: Lunkwill@39:176/208.0
- Skywalker@39:176/208.3
-
- Call these BBSs:
- Sweet Dreams - +49-6404-61539 (Line 1, ZyXEL 19k2, 24h)
- +49-6404-65106 (Line 2, ZyXEL 16k8, 22-15h)
- Thunder Dome - +49-6408-3249 (Line 1, ZyXEL 19k2, 24h)
- +49-6408-3779 (Line 2, ZyXEL 19k2, 22-13h)
-
-
- HISTORY
- V37.5, 17-03-95
- - some optimization of existing code (oh really? :) )
- - replaced the "usage: ..." errormessage with a PrintFault()
- this is both shorter and localized.
- - reduced the delay before exiting to 0.2s (should be sufficient...)
- - got executable 44 bytes shorter again 8>>>
- V37.4, 23-02-95, floating around on some BBSs but not on AmiNet
- - tried to optimize it for 020+, without much success 8->
- what remains is the new asm syntax - it still runs on 68000.
- - made the patch 100% system conforming (if no bugs are left...) by:
- a) avoiding calls to dos.library when the code was called from a
- task
- b) adding 1s delay before exit to make sure every task has exited
- from the patch code. Just for completeness... :)
- - squeezed some more bytes out of the executable so despite the
- additional code the program is 44 bytes shorter than V37.3. Code got
- pretty wierd in places... (size fanatics? us? noooo...never!)
- - resisted the temptation to fill up some of the 44 bytes with a
- "MagicCX SUXXX!" message. But as this message is real important it
- got into the dox.
- V37.3, 18-11-94
- - removed some bogus code and useless variables from earlier test-versions
- - uses much less stack because only the necessary regs are saved inside the
- functions, not the whole register file.
- V37.2, 10-11-94, unreleased
- - The env-variable's name is now selectable via commandline. So
- you can save the "set RSHELL-PROTECTOR 1" in the shell-startup if
- you run AUSH which has a variable called "remote" by itself.
- - Some stupid sourcecode dox
- V37.1, 23-10-94, initial release
-
- FUTURE
- Maybe a WB emulation using RIP-term...? :^)
-